﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using A2DFramework.InstanceService;
using A2DFramework.QueueService.Providers;

namespace A2DFramework.QueueService
{
    public static class Starter
    {
        public static void Init()
        {
            switch (QueueConfiguration.QueueConfiguration.QueueType)
            {
                case QueueType.MSMQ:
                    ObjectFactory.Register<IQueueProvider, MSMQProvider>();
                    ObjectFactory.Register<IQueue, QueueService>();
                    break;
                case QueueType.Redis:
                    ObjectFactory.Register<IQueueProvider, RedisProvider>();
                    ObjectFactory.Register<IQueue, QueueService>();
                    break;
            }
        }
    }
}